
const { projectModel, projectDbModel } = require('../model/project');
const logger = require('../config/logger');

class projectDbHelper {
    static async saveProject(doc) {
        const project = new projectDbModel(doc);
        let res = await project.save().catch(err => {
            logger.error(err);
        });
        return !!res;
    }
    static async queryProjectList(query) {
        let res = await projectDbModel.find(query).catch(err => {
            logger.error(err);
        });
        return res;
    }
}

module.exports = projectDbHelper;